cmake_minimum_required(VERSION 3.5)

add_definitions(-std=c++11)
SET(CMAKE_BUILD_TYPE "Release")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")

project(sample_cli)

#添加头文件查找目录	
include_directories(
    ./
    include/
    )
    
FILE(GLOB SRC_LISTS ./src/*.cpp ./sample/*.cpp)

#输出lib
set(LIBRARY_OUTPUT_PATH ./output)
add_library(opencli STATIC ./src/cli.cpp)
add_library(opencli_share SHARED ./src/cli.cpp)

#输出可执行文件
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ./output)
add_executable(sample_cli ${SRC_LISTS})
target_link_libraries(sample_cli      
    pthread
)
